package com.aspose.cells;

public class ShapePropertyCollection {
   private Chart c;
   private Workbook d;
   Object a;
   int b;
   private zbnv e;
   private zbcc f;
   private zsb g;
   private Format3D h;
   private ShadowEffect i = null;

   ShapePropertyCollection(Chart chart, Object parent, int parentFlag) {
      this.c = chart;
      this.d = chart.j().n();
      this.a = parent;
      this.b = parentFlag;
      this.o();
   }

   private void o() {
      boolean var1 = false;
      if (this.b == 8) {
         Series var2 = (Series)this.a;
         var1 = var2.getShadow();
      } else if (this.b == 5) {
         ChartPoint var3 = (ChartPoint)this.a;
         var1 = var3.getShadow();
      }

      if (var1 && !this.i()) {
         this.a(true);
      }

   }

   Workbook a() {
      return this.d;
   }

   zbnv b() {
      return this.e;
   }

   zbnv c() {
      if (this.e == null) {
         this.e = new zbnv(this.d, this);
      }

      return this.e;
   }

   zbcc d() {
      return this.f;
   }

   zbcc e() {
      if (this.f == null) {
         this.f = new zbcc(this);
      }

      return this.f;
   }

   zsb f() {
      return this.g;
   }

   zsb g() {
      if (this.g == null) {
         this.g = new zsb(this.a(), this);
      }

      return this.g;
   }

   void a(ShapePropertyCollection var1, CopyOptions var2) {
      if (var1.g != null) {
         this.g = new zsb(this.a(), this);
         this.g.a(var1.g);
      }

      if (var1.e != null) {
         this.e = new zbnv(this.d, this);
         this.e.a(var1.e);
      }

      if (var1.f != null) {
         this.f = new zbcc(this);
         this.f.a(var1.f);
      }

      if (var1.k() != null) {
         Area var3 = this.l();
         if (var3 != null) {
            var3.a(var1.k(), var2);
         }
      }

      if (var1.m() != null) {
         Line var4 = this.n();
         if (var4 != null) {
            var4.a(var1.m());
         }
      }

   }

   boolean a(ShapePropertyCollection var1, zma var2) {
      if (this.g != null || var1.g != null) {
         if (this.g == null || var1.g == null) {
            return false;
         }

         if (!this.g.b(var1.g)) {
            return false;
         }
      }

      if (this.e != null || var1.e != null) {
         if (this.e == null || var1.e == null) {
            return false;
         }

         if (!this.e.b(var1.e)) {
            return false;
         }
      }

      if (this.f != null || var1.f != null) {
         if (this.f == null || var1.f == null) {
            return false;
         }

         if (!this.f.b(var1.f)) {
            return false;
         }
      }

      if (this.k() != null || var1.k() != null) {
         if (this.k() == null || var1.k() == null) {
            return false;
         }

         if (!this.k().a(var1.k(), var2)) {
            return false;
         }
      }

      if (this.m() != null || var1.m() != null) {
         if (this.m() == null || var1.m() == null) {
            return false;
         }

         if (!this.m().b(var1.m())) {
            return false;
         }
      }

      return true;
   }

   void h() {
      if (this.b == 11) {
         ((ChartFrame)this.a).setShadow(this.i());
      } else if (this.b == 8) {
         ((Series)this.a).setShadow(this.i());
      } else if (this.b == 5) {
         ((ChartPoint)this.a).setShadow(this.i());
      }

   }

   boolean i() {
      return this.g != null && this.g.j() != null;
   }

   void a(boolean var1) {
      this.g().f();
      if (var1) {
         zasi var2 = this.g().i();
         CellsColor var3 = new CellsColor(this.d);
         var3.a.a(2, Color.getBlack().toArgb());
         var2.a(var3);
         var2.d = 2700000;
         var2.e = 35921;
         var2.c = 2;
      }
   }

   void j() {
      this.c().a(2);
   }

   Area k() {
      switch(this.b) {
      case 0:
         return ((Axis)this.a).d();
      case 1:
      case 2:
      case 3:
      case 6:
      case 7:
      default:
         return null;
      case 4:
         return ((Marker)this.a).b();
      case 5:
         return ((ChartPoint)this.a).g();
      case 8:
         if (this.a((Series)this.a)) {
            return null;
         }

         return ((Series)this.a).d();
      case 9:
         return ((DropBars)this.a).b();
      case 10:
         return (Area)this.a;
      case 11:
         return ((ChartFrame)this.a).f();
      }
   }

   private boolean a(Series var1) {
      int var2 = var1.s().j();
      boolean var3 = ChartCollection.n(var2) || ChartCollection.r(var2);
      boolean var4 = ChartCollection.k(var2);
      return var3 && var2 != 43 || var4 || var2 == 57 || var2 == 58;
   }

   Area l() {
      switch(this.b) {
      case 0:
         return ((Axis)this.a).getArea();
      case 1:
      case 2:
      case 3:
      case 6:
      case 7:
      default:
         return null;
      case 4:
         return ((Marker)this.a).getArea();
      case 5:
         return ((ChartPoint)this.a).getArea();
      case 8:
         if (this.a((Series)this.a)) {
            return null;
         }

         return ((Series)this.a).getArea();
      case 9:
         return ((DropBars)this.a).getArea();
      case 10:
         return (Area)this.a;
      case 11:
         return ((ChartFrame)this.a).getArea();
      }
   }

   Line m() {
      switch(this.b) {
      case 0:
         return ((Axis)this.a).i();
      case 1:
         return ((Axis)this.a).o();
      case 2:
         return ((Axis)this.a).p();
      case 3:
         return ((ChartDataTable)this.a).c();
      case 4:
         return ((Marker)this.a).c();
      case 5:
         return ((ChartPoint)this.a).f();
      case 6:
         return (Line)this.a;
      case 7:
         return (Line)this.a;
      case 8:
         return ((Series)this.a).e();
      case 9:
         return ((DropBars)this.a).a();
      case 10:
         return ((Floor)this.a).getBorder();
      case 11:
         return ((ChartFrame)this.a).e();
      case 12:
         return ((ziz)this.a).R();
      case 13:
         return ((ziz)this.a).P();
      case 14:
         return ((ziz)this.a).Q();
      case 15:
         return ((ziz)this.a).O();
      case 16:
         return ((Series)this.a).A();
      default:
         return null;
      }
   }

   Line n() {
      switch(this.b) {
      case 0:
         return ((Axis)this.a).getAxisLine();
      case 1:
         return ((Axis)this.a).getMajorGridLines();
      case 2:
         return ((Axis)this.a).getMinorGridLines();
      case 3:
         return ((ChartDataTable)this.a).getBorder();
      case 4:
         return ((Marker)this.a).getBorder();
      case 5:
         return ((ChartPoint)this.a).getBorder();
      case 6:
         return (Line)this.a;
      case 7:
         return (Line)this.a;
      case 8:
         return ((Series)this.a).getBorder();
      case 9:
         return ((DropBars)this.a).getBorder();
      case 10:
         return ((Floor)this.a).getBorder();
      case 11:
         return ((ChartFrame)this.a).getBorder();
      case 12:
         return ((ziz)this.a).q();
      case 13:
         return ((ziz)this.a).s();
      case 14:
         return ((ziz)this.a).o();
      case 15:
         return ((ziz)this.a).N();
      case 16:
         return ((Series)this.a).getLeaderLines();
      default:
         return null;
      }
   }

   public GlowEffect getGlowEffect() {
      return this.g().d();
   }

   public void clearGlowEffect() {
      if (this.g != null) {
         this.g.a((GlowEffect)null);
      }

   }

   public boolean hasGlowEffect() {
      return this.g != null && this.g.e() != null && this.g.e().a();
   }

   public Format3D getFormat3D() {
      if (this.h == null) {
         this.h = new Format3D(this);
      }

      return this.h;
   }

   public boolean hasFormat3D() {
      return this.f != null && this.e != null;
   }

   public void clearFormat3D() {
      this.f = null;
      this.e = null;
   }

   public double getSoftEdgeRadius() {
      return this.g == null ? 0.0D : this.g().p();
   }

   public void setSoftEdgeRadius(double value) {
      this.g().a(value);
   }

   public ShadowEffect getShadowEffect() {
      if (this.i == null) {
         this.i = new ShadowEffect(this);
      }

      return this.i;
   }

   public void clearShadowEffect() {
      if (this.g != null) {
         this.g.f();
      }

   }

   public boolean hasShadowEffect() {
      if (this.g == null) {
         return false;
      } else {
         zasi var1 = this.g.j();
         zakj var2 = this.g.h();
         return var1 != null || var2 != null;
      }
   }
}
